var f=Object.defineProperty;var _=(l,e,t)=>e in l?f(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var d=(l,e,t)=>(_(l,typeof e!="symbol"?e+"":e,t),t);var o=(l,e,t)=>new Promise((n,c)=>{var S=s=>{try{r(t.next(s))}catch(i){c(i)}},I=s=>{try{r(t.throw(s))}catch(i){c(i)}},r=s=>s.done?n(s.value):Promise.resolve(s.value).then(S,I);r((t=t.apply(l,e)).next())});import{MapAttr as D}from"./MapAttr-b9cf931d.js";import{fc as y,eZ as M,ad as N}from"./index-68beeb37.js";import"./Events-141c34ea.js";class x extends y{constructor(){super("GPN_ImpDtlAttrs");d(this,"Imp",`
  #### 帮助
  - 选择一个从表，然后导入字段.
  - 已经有的就自动创建.
  - 
  #### 配置图
  - sdfsdfsd
`);d(this,"Imp_SelectDtl",`
  #### 帮助
  - csdfsadfsad
  #### 配置图
  - sdfsdfsd
`);d(this,"Imp_SelectDtl_SelectFields",`
  #### 帮助
  - csdfsadfsad
  #### 配置图
  - sdfsdfsd
`);this.PageTitle="导入实体字段"}Init(){this.AddGroup("A","导入实体字段"),this.AddBlank("Imp","准备",this.Imp),this.SelectItemsByList("Imp.SelectDtl","选择从表",this.Imp_SelectDtl,!1,"SELECT No,Name FROM Sys_MapDtl ");const t="SELECT MyPK as No, Name FROM Sys_MapAttr WHERE FK_MapData='@Imp.SelectDtl_tb1' ";this.SelectItemsByList("Imp.SelectDtl.SelectFields","选择字段",this.Imp_SelectDtl_SelectFields,!0,t)}GenerSorts(){return o(this,null,function*(){return Promise.resolve([])})}Save_TextBox_X(t,n,c,S,I){return o(this,null,function*(){if(t==="Imp.SelectDtl.SelectFields"){const r=this.PKVal,s=c.split(",");let i="";const a=new D;for(let m=0;m<s.length;m++){const p=s[m];if(a.MyPK=p,yield a.Retrieve(),a.MyPK=r+"_"+a.Key,(yield a.IsExits())==!0){i+=`@字段: ${p} - ${a.Name} 已经存在.`;continue}a.FK_MapData=r,yield a.Insert(),i+=`@字段: ${p} - ${a.Name} 成功导入...`}return new M(N.Message,i)}})}}export{x as GPN_ImpDtlAttrs};
